//
//  popCell.m
//  弹出视图测试版
//
//  Created by AgileMobi on 15/12/15.
//  Copyright © 2015年 Agilemobi. All rights reserved.
//

#import "popCell.h"

@implementation popCell
{
   NSInteger selectedIndex;

}
- (void)awakeFromNib {
    // Initialization code
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self= [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.btn= [UIButton buttonWithType:UIButtonTypeCustom];
         self.btn.frame = CGRectMake(10, 10,20, 20);
     
        [self addSubview: self.btn];
        
        self.label = [[UILabel alloc]initWithFrame:CGRectMake(50, 10, self.frame.size.width-30, 25)];
        self.backgroundColor = [UIColor whiteColor];
        [self addSubview:self.label];
    }
    return self;

}
-(void)layoutSubviews{
    [super layoutSubviews];
    if (self.btn.selected) {
         [self.btn setImage:[UIImage imageNamed:@"select"] forState:UIControlStateSelected];
    }
    else
    {
    [ self.btn setImage:[UIImage imageNamed:@"unselect"] forState:UIControlStateNormal];
    }
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
